3.3.15 \(\int \sec ^3(c+b x) \sin (a+b x) \, dx\) [215]

Optimal. Leaf size=38 \[ \frac {\cos (a-c) \sec ^2(c+b x)}{2 b}+\frac {\sin (a-c) \tan (c+b x)}{b} \]

[Out]

1/2*cos(a-c)*sec(b*x+c)^2/b+sin(a-c)*tan(b*x+c)/b

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4676, 2686, 30, 3852, 8} \begin {gather*} \frac {\sin (a-c) \tan (b x+c)}{b}+\frac {\cos (a-c) \sec ^2(b x+c)}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + b*x]^3*Sin[a + b*x],x]

[Out]

(Cos[a - c]*Sec[c + b*x]^2)/(2*b) + (Sin[a - c]*Tan[c + b*x])/b

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 4676

Int[Sec[w_]^(n_.)*Sin[v_], x_Symbol] :> Dist[Cos[v - w], Int[Tan[w]*Sec[w]^(n - 1), x], x] + Dist[Sin[v - w],
Int[Sec[w]^(n - 1), x], x] /; GtQ[n, 0] && FreeQ[v - w, x] && NeQ[w, v]

Rubi steps

\begin {align*} \int \sec ^3(c+b x) \sin (a+b x) \, dx &=\cos (a-c) \int \sec ^2(c+b x) \tan (c+b x) \, dx+\sin (a-c) \int \sec ^2(c+b x) \, dx\\ &=\frac {\cos (a-c) \text {Subst}(\int x \, dx,x,\sec (c+b x))}{b}-\frac {\sin (a-c) \text {Subst}(\int 1 \, dx,x,-\tan (c+b x))}{b}\\ &=\frac {\cos (a-c) \sec ^2(c+b x)}{2 b}+\frac {\sin (a-c) \tan (c+b x)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.20, size = 34, normalized size = 0.89 \begin {gather*} \frac {\sec (c) \sec ^2(c+b x) (\cos (a)+\sin (a-c) \sin (c+2 b x))}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + b*x]^3*Sin[a + b*x],x]

[Out]

(Sec[c]*Sec[c + b*x]^2*(Cos[a] + Sin[a - c]*Sin[c + 2*b*x]))/(2*b)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(120\) vs. \(2(36)=72\).
time = 0.97, size = 121, normalized size = 3.18

method result size
risch \(\frac {2 \,{\mathrm e}^{i \left (2 b x +5 a +c \right )}+{\mathrm e}^{i \left (5 a -c \right )}-{\mathrm e}^{i \left (3 a +c \right )}}{\left ({\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )^{2} b}\) \(61\)
default \(\frac {\frac {\cos \left (a \right ) \cos \left (c \right )+\sin \left (a \right ) \sin \left (c \right )}{2 \left (\sin \left (a \right ) \cos \left (c \right )-\cos \left (a \right ) \sin \left (c \right )\right )^{2} \left (-\tan \left (b x +a \right ) \cos \left (a \right ) \sin \left (c \right )+\tan \left (b x +a \right ) \sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \cos \left (c \right )+\sin \left (a \right ) \sin \left (c \right )\right )^{2}}-\frac {1}{\left (\sin \left (a \right ) \cos \left (c \right )-\cos \left (a \right ) \sin \left (c \right )\right )^{2} \left (-\tan \left (b x +a \right ) \cos \left (a \right ) \sin \left (c \right )+\tan \left (b x +a \right ) \sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \cos \left (c \right )+\sin \left (a \right ) \sin \left (c \right )\right )}}{b}\) \(121\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(b*x+c)^3*sin(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/b*(1/2*(cos(a)*cos(c)+sin(a)*sin(c))/(sin(a)*cos(c)-cos(a)*sin(c))^2/(-tan(b*x+a)*cos(a)*sin(c)+tan(b*x+a)*s
in(a)*cos(c)+cos(a)*cos(c)+sin(a)*sin(c))^2-1/(sin(a)*cos(c)-cos(a)*sin(c))^2/(-tan(b*x+a)*cos(a)*sin(c)+tan(b
*x+a)*sin(a)*cos(c)+cos(a)*cos(c)+sin(a)*sin(c)))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 391 vs. \(2 (36) = 72\).
time = 0.29, size = 391, normalized size = 10.29 \begin {gather*} \frac {{\left (2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) + \cos \left (2 \, a\right ) - \cos \left (2 \, c\right )\right )} \cos \left (4 \, b x + a + 5 \, c\right ) + 2 \, {\left (2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) + \cos \left (2 \, a\right ) - \cos \left (2 \, c\right )\right )} \cos \left (2 \, b x + a + 3 \, c\right ) + {\left (\cos \left (2 \, a\right ) - \cos \left (2 \, c\right )\right )} \cos \left (a + c\right ) + 2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) \cos \left (a + c\right ) + {\left (2 \, \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) + \sin \left (2 \, a\right ) - \sin \left (2 \, c\right )\right )} \sin \left (4 \, b x + a + 5 \, c\right ) + 2 \, {\left (2 \, \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) + \sin \left (2 \, a\right ) - \sin \left (2 \, c\right )\right )} \sin \left (2 \, b x + a + 3 \, c\right ) + {\left (\sin \left (2 \, a\right ) - \sin \left (2 \, c\right )\right )} \sin \left (a + c\right ) + 2 \, \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) \sin \left (a + c\right )}{b \cos \left (4 \, b x + a + 5 \, c\right )^{2} + 4 \, b \cos \left (2 \, b x + a + 3 \, c\right )^{2} + 4 \, b \cos \left (2 \, b x + a + 3 \, c\right ) \cos \left (a + c\right ) + b \cos \left (a + c\right )^{2} + b \sin \left (4 \, b x + a + 5 \, c\right )^{2} + 4 \, b \sin \left (2 \, b x + a + 3 \, c\right )^{2} + 4 \, b \sin \left (2 \, b x + a + 3 \, c\right ) \sin \left (a + c\right ) + b \sin \left (a + c\right )^{2} + 2 \, {\left (2 \, b \cos \left (2 \, b x + a + 3 \, c\right ) + b \cos \left (a + c\right )\right )} \cos \left (4 \, b x + a + 5 \, c\right ) + 2 \, {\left (2 \, b \sin \left (2 \, b x + a + 3 \, c\right ) + b \sin \left (a + c\right )\right )} \sin \left (4 \, b x + a + 5 \, c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+c)^3*sin(b*x+a),x, algorithm="maxima")

[Out]

((2*cos(2*b*x + 2*a + 2*c) + cos(2*a) - cos(2*c))*cos(4*b*x + a + 5*c) + 2*(2*cos(2*b*x + 2*a + 2*c) + cos(2*a
) - cos(2*c))*cos(2*b*x + a + 3*c) + (cos(2*a) - cos(2*c))*cos(a + c) + 2*cos(2*b*x + 2*a + 2*c)*cos(a + c) +
(2*sin(2*b*x + 2*a + 2*c) + sin(2*a) - sin(2*c))*sin(4*b*x + a + 5*c) + 2*(2*sin(2*b*x + 2*a + 2*c) + sin(2*a)
 - sin(2*c))*sin(2*b*x + a + 3*c) + (sin(2*a) - sin(2*c))*sin(a + c) + 2*sin(2*b*x + 2*a + 2*c)*sin(a + c))/(b
*cos(4*b*x + a + 5*c)^2 + 4*b*cos(2*b*x + a + 3*c)^2 + 4*b*cos(2*b*x + a + 3*c)*cos(a + c) + b*cos(a + c)^2 +
b*sin(4*b*x + a + 5*c)^2 + 4*b*sin(2*b*x + a + 3*c)^2 + 4*b*sin(2*b*x + a + 3*c)*sin(a + c) + b*sin(a + c)^2 +
 2*(2*b*cos(2*b*x + a + 3*c) + b*cos(a + c))*cos(4*b*x + a + 5*c) + 2*(2*b*sin(2*b*x + a + 3*c) + b*sin(a + c)
)*sin(4*b*x + a + 5*c))

________________________________________________________________________________________

Fricas [A]
time = 3.60, size = 42, normalized size = 1.11 \begin {gather*} -\frac {2 \, \cos \left (b x + c\right ) \sin \left (b x + c\right ) \sin \left (-a + c\right ) - \cos \left (-a + c\right )}{2 \, b \cos \left (b x + c\right )^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+c)^3*sin(b*x+a),x, algorithm="fricas")

[Out]

-1/2*(2*cos(b*x + c)*sin(b*x + c)*sin(-a + c) - cos(-a + c))/(b*cos(b*x + c)^2)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+c)**3*sin(b*x+a),x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 174 vs. \(2 (36) = 72\).
time = 0.42, size = 174, normalized size = 4.58 \begin {gather*} \frac {\tan \left (b x + c\right )^{2} \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} - \tan \left (b x + c\right )^{2} \tan \left (\frac {1}{2} \, a\right )^{2} + 4 \, \tan \left (b x + c\right )^{2} \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right ) + 4 \, \tan \left (b x + c\right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - \tan \left (b x + c\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} - 4 \, \tan \left (b x + c\right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (b x + c\right )^{2} + 4 \, \tan \left (b x + c\right ) \tan \left (\frac {1}{2} \, a\right ) - 4 \, \tan \left (b x + c\right ) \tan \left (\frac {1}{2} \, c\right )}{2 \, {\left (\tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, a\right )^{2} + \tan \left (\frac {1}{2} \, c\right )^{2} + 1\right )} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+c)^3*sin(b*x+a),x, algorithm="giac")

[Out]

1/2*(tan(b*x + c)^2*tan(1/2*a)^2*tan(1/2*c)^2 - tan(b*x + c)^2*tan(1/2*a)^2 + 4*tan(b*x + c)^2*tan(1/2*a)*tan(
1/2*c) + 4*tan(b*x + c)*tan(1/2*a)^2*tan(1/2*c) - tan(b*x + c)^2*tan(1/2*c)^2 - 4*tan(b*x + c)*tan(1/2*a)*tan(
1/2*c)^2 + tan(b*x + c)^2 + 4*tan(b*x + c)*tan(1/2*a) - 4*tan(b*x + c)*tan(1/2*c))/((tan(1/2*a)^2*tan(1/2*c)^2
 + tan(1/2*a)^2 + tan(1/2*c)^2 + 1)*b)

________________________________________________________________________________________

Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \text {Hanged} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)/cos(c + b*x)^3,x)

[Out]

\text{Hanged}

________________________________________________________________________________________